Skip to content

Conversation

Ickerday
Copy link
Collaborator

@Ickerday Ickerday commented Sep 9, 2025

TODO: Verify I replaced all tox usages with alternatives, update docs

Confusingly tox is now a psuedo-Makefile, lists project dependencies, runs an almost random assortment of scripts and whatever else. I want to bring order to this chaos.

I also want to remove all the commands we don't use in docs' Makefile. Maybe move it to the main Makefile if possible.

@Ickerday Ickerday force-pushed the dev/BJ/docs-bugfixes branch from d073d5d to 60df5a0 Compare September 9, 2025 14:21
@Ickerday Ickerday changed the title Remove tox, cleanup in docs/Makefile Replace tox with pytest and Makefile, cleanup in docs/Makefile Sep 10, 2025
Copy link
Contributor

@cecyliaborek cecyliaborek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great cleanup ✨

@Ickerday Ickerday force-pushed the dev/BJ/docs-bugfixes branch from fd3310d to 8e99721 Compare September 16, 2025 15:21
@Ickerday Ickerday marked this pull request as ready for review September 19, 2025 14:52
@Ickerday Ickerday force-pushed the dev/BJ/docs-bugfixes branch from 12c99e8 to 37d5537 Compare September 22, 2025 15:29
Makefile Outdated
@@ -1,56 +1,48 @@
RESET_COLOR=\033[0m
GREEN_COLOR=\033[32;01m

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove that newline

printf "\rWaiting for Splunk for %s seconds..." $$i; \
sleep 1; \
done
.PHONY: docker-start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add newline before this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't wait for us finally dropping py3.7, I'll be adding mbake to dev deps so fast lol

Makefile Outdated
.PHONY: docker-ensure-up
docker-ensure-up:
@for i in `seq 0 180`; do \
if docker exec -it $(CONTAINER_NAME) /sbin/checkstate.sh &> /dev/null; then \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command is really bad and i have been frustrated with it (while using podman), since it does not differentiate between errors returned by docker/shell and checkstate.sh errors.

Suggested change
if docker exec -it $(CONTAINER_NAME) /sbin/checkstate.sh &> /dev/null; then \
if docker exec -it $(CONTAINER_NAME) /bin/bash -c "/sbin/checkstate.sh &> /dev/null"; then \

This way you at least get an error that docker is not in $PATH and users will act accordingly (edit MakeFile to use podman or just do not use docker-ensure-up, instead of endless waiting).

[mateusz@MPOLIWCZ-M-3NJ6 splunk-sdk-python ]$ make docker-ensure-up
/bin/sh: docker: command not found
Waiting for Splunk for 0 seconds...^[[A/bin/sh: docker: command not found
Waiting for Splunk for 1 seconds.../bin/sh: docker: command not found
Waiting for Splunk for 2 seconds.../bin/sh: docker: command not found
Waiting for Splunk for 3 seconds.../bin/sh: docker: command not found
Waiting for Splunk for 4 seconds.../bin/sh: docker: command not found

Still not ideal, but at least the error is visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants